package com.nmsl.controller;

import com.nmsl.common.core.domain.R;
import com.nmsl.domain.TySysUser;
import com.nmsl.service.TySysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/tySysUser")
public class TySysUserController {
    @Autowired
    private TySysUserService tySysUserService;
    @GetMapping("/getMyUserId/{userName}")
    public R getMyUserId(@PathVariable String userName) {
        System.out.println("Received userName: " + userName); // 添加日志
        return R.ok(tySysUserService.getMyUserIdByUserName(userName));
    }
    @GetMapping("/callUpdateAndInsertUser/{userName}")
    public R callUpdateAndInsertUser(@PathVariable String userName) {
        System.out.println("Received userName: " + userName);
        return R.ok(tySysUserService.callUpdateAndInsertUser(userName));
    }
}
